﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace Hisun.View.ReportQuery
{
    public partial class Download_CPZYZXCBHZB : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["MyZipPath"].ToString().Length > 1)
            {
                if (File.Exists(Session["MyZipPath"].ToString()))
                {
                    Response.Clear();
                    string httpHeader = "attachment;filename=" + "hisun" + " .zip";
                    Response.AppendHeader("Content-Disposition", httpHeader);
                    Response.WriteFile(Session["MyZipPath"].ToString());
                    Response.Flush();
                    Response.End();
                    return;
                }                               
                 

            }
            Response.Write("<script>非法访问或者系统出错。</script>");

        }
    }
}
